#include "widget.h"
#include "ui_widget.h"
#include"QPixmap"
#include"QResizeEvent"
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QRect aq=this->geometry();
    ui->label_2->setGeometry(0,0,aq.width(),aq.height());
    QPixmap as(":/xiaojiejie.jpg");
    ui->label_2->setPixmap(as);
    ui->label_2->setScaledContents(true);
}

void Widget::resizeEvent(QResizeEvent *event)
{
    ui->label_2->setGeometry(0,0,event->size().width(),event->size().height());
}

Widget::~Widget()
{
    delete ui;
}

